package cn.java75.sp.dao;

import cn.java75.sp.entity.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

import java.util.Set;

/**
 * @author oldliu
 * @since 1.0
 */
@Cacheable//(key="student")
@CacheConfig(cacheNames = "admin")
public interface AdminDao {
    @Cacheable
    public Admin login(@Param("u") String u, @Param("p") String p);
    public Admin get(@Param("u") String u);
    @Cacheable
    public Set<RoleRight> getRightsByUser(long roleid);
}
